﻿<%@ Page Title="" Language="C#" MasterPageFile="~/User/User.Master" AutoEventWireup="true" CodeBehind="KC_PD_BZX.aspx.cs" Inherits="CoolERP_Web.User.KC_PD_BZX" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript">
    function checkSubmit() {
        if (isEmpty($("#txtDataList").val())) {
            alert("请导入盘点数据");
            return false;
        }
        return true;
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td class=tbHead_L></td>
        <td class=tbHead_M><div><B>包装箱库存盘点</B></div></td>
        <td class=tbHead_R></td>
    </tr>
    <tr>
        <td class=tbBody_L></td>
        <td class=tbBody_M>
            <ul class=tags style="width:95%;">
                <li class=liTitle><div>库存查询</div></li>
            </ul>
            <table class="grvCSS" cellspacing="0" cellpadding=2 border="1" style="width:95%;border-collapse:collapse;">
                <tr>
                    <td><asp:TextBox ID="txtDataList" runat="server" TextMode=MultiLine Width=500px Height=100px></asp:TextBox></td>
                    <td align=left><p>在左则导入盘点数据</p>
                    <asp:ImageButton ID="btnImport" runat="server" ImageUrl="~/Images/Common/btn_ok0.png" OnClick="btnImport_Click" OnClientClick="return checkSubmit();" />
                    <p><asp:Label ID="labMsg" runat="server" ForeColor=Red></asp:Label></p></td>
                </tr>
            </table>
            <ul class=tags style="width:95%;">
                <li class=liLeft><b>盘点列表</b></li>
                <li class=selTag onclick="selTag(this);"><div><asp:LinkButton ID="LinkButton1" Text="正常" runat="server" CommandArgument="0" OnCommand="LinkButton_Command"/></div></li>
                <li onclick="selTag(this);"><div><asp:LinkButton ID="LinkButton2" Text="盘盈" runat="server" CommandArgument="1" OnCommand="LinkButton_Command"/></div></li>
                <li onclick="selTag(this);"><div><asp:LinkButton ID="LinkButton3" Text="盘亏" runat="server" CommandArgument="2" OnCommand="LinkButton_Command"/></div></li>
                <li class=liRight>盘点正常：库存数量与盘点数量相同；&nbsp;&nbsp;盘盈：盘点数量多出库存记录；&nbsp;&nbsp;盘亏：盘点数量少于库存记录</li>
            </ul>
            <div style="clear:both"></div>
            <div style="width:95%; height:500px; overflow-y:auto">
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:Panel ID="panStat" runat="server" Visible=false style="margin:10px 0px">
                盘点统计：库存总计物料<asp:Literal ID="liKcTotal" runat="server"/>，总计盘点物料<asp:Literal ID="liPdTotal" runat="server"/>，正常<asp:Literal ID="liZC" runat="server"/>，盘盈<asp:Literal ID="liPY" runat="server"/>，盘亏<asp:Literal ID="liPK" runat="server"/>
                </asp:Panel>
                <asp:GridView ID="GridView1" runat="server" DataKeyNames="ID" Width="100%" CssClass="grvCSS" AutoGenerateColumns="False" AllowPaging="True" PageSize=1000 ClientIDMode=Static OnRowDataBound="GridView1_RowDataBound">
                <Columns>
                    <asp:TemplateField HeaderText="序号">
                    <ItemTemplate><%# Container.DataItemIndex + 1 %></ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="包装类型">
                        <ItemTemplate><%# Convert.ToInt32(Eval("LX")) == 0 ? "普通包装" : "标准包装"%></ItemTemplate>
                    </asp:TemplateField>      
                    <asp:BoundField DataField="BH" HeaderText="编号"/>
                    <asp:BoundField DataField="MC" HeaderText="名称"/>
                    <asp:TemplateField HeaderText="外（长*宽*高）">
                        <ItemTemplate><%# Eval("WChang")%>*<%# Eval("WKuan")%>*<%# Eval("WGao")%></ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="DWMC" HeaderText="库存单位"/>
                    <asp:BoundField DataField="CKMC" HeaderText="仓库"/>
                    <asp:TemplateField>
                        <HeaderTemplate>仓位（区-行-列-层-格）</HeaderTemplate>
                        <ItemTemplate><%# Eval("QU")%>-<%# Eval("HANG")%>-<%# Eval("LIE")%>-<%# Eval("CENG")%>-<%# Eval("GE")%></ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="原库存量">
                        <ItemTemplate><div style="float:right"><%# Convert.ToDecimal(Eval("SL")).ToString("F")%></div></ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="盘点数量">
                        <ItemTemplate><div style="float:right"><asp:Label ID="labPDZL" runat="server"/></div></ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <PagerSettings Visible=false />
                </asp:GridView>
            </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="LinkButton1" EventName="Command" />
                    <asp:AsyncPostBackTrigger ControlID="LinkButton2" EventName="Command" />
                    <asp:AsyncPostBackTrigger ControlID="LinkButton3" EventName="Command" />
                    <asp:PostBackTrigger ControlID="btnImport" />
                </Triggers>
            </asp:UpdatePanel>
            </div>
        </td>
        <td class=tbBody_R></td>
    </tr>
    <tr>
        <td class=tbFoot_L></td>
        <td class=tbFoot_M></td>
        <td class=tbFoot_R></td>
    </tr>
</table>
</asp:Content>
